import 'package:amoy_ticket/perform/data_info.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class NextPage extends StatefulWidget {
  NextPage({Key? key}) : super(key: key);

  @override
  _NextPageState createState() => _NextPageState();
}

class _NextPageState extends State<NextPage> {
  @override
  Widget build(BuildContext context) {
    return Consumer(builder: (context, DataInfo dataInfo, _) {
      return Scaffold(
        appBar: AppBar(title: Text('next')),
        body: Center(
          child: Column(
            children: [
              FloatingActionButton(
                child: Icon(Icons.add),
                onPressed: () {
                  dataInfo.addCount();
                },
              ),
              FloatingActionButton(
                onPressed: () {
                  dataInfo.subCount();
                },
                child: Icon(Icons.add),
              )
            ],
          ),
        ),
        floatingActionButton: FloatingActionButton(
          child: Icon(Icons.settings_input_composite),
          onPressed: () {
            Navigator.pop(context);
          },
          heroTag: 'page',
        ),
      );
    });
  }
}
